﻿// Decompiled with JetBrains decompiler
// Type: MolecularForge.MolecularForgePatches
// Assembly: MolecularForge, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 4C951792-F10F-4A61-8C43-785FF79DC05B
// Assembly location: D:\Devlop\ONI_ORI_MOD\fenzi\MolecularForge.dll

using HarmonyLib;
using System.Collections.Generic;

namespace MolecularForge
{
  public class MolecularForgePatches
  {

    public static void makeARecipe2(SimHashes inMaterial, float amountIn, SimHashes outMaterial, float amountOut, string description)
    {

        ComplexRecipe.RecipeElement[] recipeElementArray1 = new ComplexRecipe.RecipeElement[1]
        {
        new ComplexRecipe.RecipeElement(inMaterial.CreateTag(), amountIn)
        };
        ComplexRecipe.RecipeElement[] recipeElementArray2 = new ComplexRecipe.RecipeElement[1]
        {
        new ComplexRecipe.RecipeElement(outMaterial.CreateTag(), amountOut)
        };
        ComplexRecipe complexRecipe1 = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("SupermaterialRefinery", (IList<ComplexRecipe.RecipeElement>)recipeElementArray1, (IList<ComplexRecipe.RecipeElement>)recipeElementArray2), recipeElementArray1, recipeElementArray2)
        {
            time = 80f,
            description = description,
            nameDisplay = ComplexRecipe.RecipeNameDisplay.Result,
            fabricators = new List<Tag>()
        {
            TagManager.Create("SupermaterialRefinery")
        }
        };
    }

    [HarmonyPatch(typeof (SupermaterialRefineryConfig))]
    [HarmonyPatch("ConfigureBuildingTemplate")]
    public class SupermaterialRefineryConfig_ConfigureBuildingTemplate_Patch
    {
      public static void Postfix()
      {
        MolecularForgePatches.makeARecipe2(SimHashes.SedimentaryRock, 1000f, SimHashes.Salt, 5000f, "More Salt");  // 沙质岩 => 盐
        MolecularForgePatches.makeARecipe2(SimHashes.MaficRock, 1000f, SimHashes.Fertilizer, 5000f, "More Fertilizer"); // 镁铁质岩 => 肥料
        MolecularForgePatches.makeARecipe2(SimHashes.Granite, 1000f, SimHashes.Isoresin, 500f, "More Salt"); // 花岗岩 => 异松香
        MolecularForgePatches.makeARecipe2(SimHashes.IgneousRock, 1000f, SimHashes.Fullerene, 500f, "More Fullerene"); // 火成岩 => 富勒烯
        MolecularForgePatches.makeARecipe2(SimHashes.Regolith, 1000f, SimHashes.Lime, 500f, "More Lime"); // 泥岩  => 石灰
        MolecularForgePatches.makeARecipe2(SimHashes.Obsidian, 1000f, SimHashes.Niobium, 1000f, "More Lime"); // 黑曜石 => 铌
        MolecularForgePatches.makeARecipe2(SimHashes.SandStone, 1000f, SimHashes.Niobium, 1000f, "More Niobium"); // 砂岩 => 铌
        MolecularForgePatches.makeARecipe2(SimHashes.Granite, 1000f, SimHashes.Niobium, 1000f, "More Niobium"); // 花岗岩 => 铌
      }
    }
  }
}
